package com.example.multilevelapprovalback.mapper;

import com.example.multilevelapprovalback.pojo.ApprovalRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ApprovalRecordMapper {
    /**
     * 新增审批记录
     * @param approvalRecord
     */
    void insert(ApprovalRecord approvalRecord);
    /**
     * 删除审核记录
     * @param achievementId
     * @param achievementTypeId
     */
    void delete(@Param("achievementId") String achievementId, @Param("achievementTypeId") Integer achievementTypeId);
    /**
     * 根据成果id查询审批记录
     * @param achievementId
     * @return
     */
    List<ApprovalRecord> getByachievementId(String achievementId);
    /**
     * 批量新增审批记录
     * @param approvalRecords
     */
    void batchInsert(@Param("approvalRecords") List<ApprovalRecord> approvalRecords);
}
